/*
 * Camera.cpp
 *
 *  Created on: 08/01/2012
 *      Author: Graciela

 */

#include <iostream>
#include "Camera.h"

Camera::Camera(GameObject * target) {
	this->target = target;
}

Camera::Camera() {
	this->target = NULL;
}

Camera::~Camera() {
}

void Camera::update() {
	if (target != NULL)
		setPosition(target->getX(), target->getY());
}

void Camera::setTarget(GameObject * target) {
	this->target = target;
}
